home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 20
/
Cream of the Crop 20 (Terry Blount) (1996).iso
/
program
/
vol15n10.zip
/
JULIAN.AB
next >
Wrap
Text File
|
1996-01-28
|
2KB
|
35 lines
'*********************************************************************
' Public Function DateToJulian( dtmDate ) Access 95
' Converts the passed calendar date to a Julian Date number.
'*********************************************************************
Public Function DateToJulian(dtmDate As Date) As Long
DateToJulian = (dtmDate - #1/1/100#) + 1757585
End Function
'*********************************************************************
' Public Function JulianToDate( lngJulian ) Access 95
' Converts the passed julian date number to a calendar date
'*********************************************************************
Public Function JulianToDate(lngJulian As Long) As Date
JulianToDate = lngJulian - 1757585 + #1/1/100#
End Function
'*********************************************************************
' Public Function DateToNumericDayYear(dtmDate As Date) Access 95
' Converts the passed date to the numeric day of the year (1-366)
'*********************************************************************
Public Function DateToNumericDayYear(dtmDate As Date) As Integer
DateToNumericDayYear = dtmDate - _
DateSerial(DatePart("yyyy", dtmDate), 1, 1) + 1
End Function
'*********************************************************************
' Public Function NumericDayYearToDate( intNum ) Access 95
' Converts the numeric day of the year (1-366) to a calendar date
' in the current year
'*********************************************************************
Public Function NumericDayYearToDate(intNum)
NumericDayYearToDate = _
DateSerial(DatePart("yyyy", Date), 1, 1) + intNum - 1
End Function